#ifndef GAMESTATE_H
#define GAMESTATE_H

#include <string>
#include <map>
#include <vector>
#include <list>
#include <sys/stat.h>
#include <fstream>

#include "Level.h"
#include "GameLevelState.h"

class GameState
{
    public:
        GameState();
        virtual ~GameState();
        unsigned int GetCoins() { return coins; }
        void SetCoins(unsigned int val) { coins = val; }
        unsigned int GetTotalCoins() { return totalCoins; }
        void SetTotalCoins(unsigned int val) { totalCoins = val; };

        GameLevelState * GetGameLevelState(string chapter, string level);
        void SetGameLevelState(string chapter, string level, GameLevelState *state);

        void SetCurrentState(string chapter, string level, string state);
        string GetCurrentState(string chapter, string level);
        string GetFileName() {return filename;}

        void LoadGameState(string filename);
        void SaveGameState(string filename);
    protected:
    private:
        unsigned int coins;
        unsigned int totalCoins;
        string filename;
        map< pair< string,string >, GameLevelState * > levelStates;
};

#endif // GAMESTATE_H
